'''
Created on 2013-11-01

@author: Nich
'''
import unittest
from objects.baseobject import *
from objects.materials import *
from objects.templates import *
from objects.transformations import *

class Test(unittest.TestCase):


    def setUp(self):
        self.chair = BaseObject();
        self.chair.templates.append(can_be_sat_on)
        self.chair.materials.append(wood)
        
        self.fire_resist_chair = BaseObject();
        self.fire_resist_chair.templates.append(can_be_sat_on)
        self.fire_resist_chair.materials.append(wood)
        self.fire_resist_chair.materials.append(fire_resistant)
        
        
        self.fire_proof_chair = BaseObject();
        self.fire_proof_chair.templates.append(can_be_sat_on)
        self.fire_proof_chair.materials.append(fire_proof)
        
        
        

    def tearDown(self):
        pass


    def test_chair_can_be_sat_on(self):
        self.assertTrue(self.chair.can_be_sat_on)
        self.assertTrue(self.fire_resist_chair.can_be_sat_on)
        self.assertTrue(self.fire_proof_chair.can_be_sat_on)
        
    def fire_resistance_stacks(self):
        self.assertEqual(self.chair.burning_point, 100)
        self.assertTrue(self.fire_resist_chair.burning_point, 50)
        self.assertTrue(self.fire_proof_chair.burning_point, 0)
        


if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.test']
    unittest.main()